#include "mainwindow.h"
#include"global.h"

#include <QApplication>
#include<QStandardPaths>
#include <QSettings>

int main(int argc, char *argv[])
{
    QSettings settings(":/test/qrc/config.ini", QSettings::IniFormat);
    GATE_URL = "http://" + settings.value("GateServer/host").toString() +":" + settings.value("GateServer/port").toString();
    qDebug() << GATE_URL;

    QApplication a(argc, argv);

    QFile qss(":/test/qrc/sty.qss");
    if( qss.open(QFile::ReadOnly)){
        QString style = QLatin1String(qss.readAll());
        a.setStyleSheet(style);
        qss.close();
    }else{
        qDebug("qss文件打开失败");
    }

    MainWindow w;
    w.show();
    return a.exec();
}
